package utils;

import java.io.File;

import javax.swing.filechooser.FileFilter;

public class ImgFilter extends FileFilter {		
	
	@Override
	public String getDescription() {
		return "Arquivos de imagem (*.jpg; *.png; *.bmp)";
	}	
	
	@Override
	public boolean accept(File f) {
		String fName = f.getName().toLowerCase();
        if (fName.endsWith(".jpg") || fName.endsWith(".png") || fName.endsWith(".bmp") || f.isDirectory()) 
            return true;
        else
            return false; 
	}

}
